<script setup lang="ts">
function greet(name: string, age: number = 18) {
  console.log(`Hello ${name}! You are ${age} years old.`)
}

greet('Alice', 12)
// greet({ name: 'Alice', age: 25 })
// greet({ age: 30, name: 'Bob' })

class Person {
  private name: string
  private age: number
  private gender: string

  constructor(params: { name: string; age: number; gender: string }) {
    this.name = params.name
    this.age = params.age
    this.gender = params.gender
  }

  sayHello() {
    console.log(`Hello, my name is ${this.name}, I'm${this.age} years old and I'm ${this.gender}.`)
  }
}

const john = new Person({ name: 'John', age: 25, gender: 'male' })
john.sayHello() // Output: Hello, my name is John, I'm 25 years old and I'm male.
</script>

<template>
  <div>角色管理</div>
</template>

<style lang="scss" scoped></style>
